import { ChangeDetectionStrategy, ChangeDetectorRef, Component, NgZone, OnInit } from '@angular/core';
import 'zone.js';
import { of, timer } from 'rxjs';

@Component({
  selector: 'app-zone',
  templateUrl: './zone.component.html',
  styleUrls: ['./zone.component.scss'],
  // changeDetection: ChangeDetectionStrategy.OnPush
})
export class ZoneComponent implements OnInit {
  public info = {
    name: 'aa'
  };

  constructor(
    private _ngZone: NgZone,
    private _cdr: ChangeDetectorRef
  ) {
  }

  ngOnInit(): void {
  }

  public calc(num: number): number {
    console.log('calc');
    return num * 2;
  }

  public onBtnClick(): void {
    console.log('btn click');
  }

}
